home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2005 October
/
PCWOCT05.iso
/
Software
/
FromTheMag
/
Syn Text Editor 2.1.0.46
/
synsetup-2.1.0.46.exe
/
{app}
/
asgrep.txt
< prev
next >
Wrap
Text File
|
2004-02-29
|
5KB
|
153 lines
asgrep (Grep Search) Version 2.03
---------------------------------
Copyright ⌐ 2000-2003, Ascher Stefan <stievie@utanet.at>
Danail Traichev <neum@developer.bg>
Contents:
---------
* License
* Introduction
* Commandline Arguments
* Configuration file
* Credits
License:
--------
The source of asgrep is distributed under the terms of the Mozilla Public License
Version 1.1 (the "MPL"), see the license.txt file for further informations.
Introduction:
-------------
asgrep is a Find in Files Utility, it supports Regular Expressions, multi Filemask
with Wildcards and searches recoursively all subfolders if requested. Unfortunately
it's not that fast as Borlands Turbo Grep is. Sure, there are sitting lots of
professionals, and I'm just a novice ;-).
This is a Console Program, i.e. it has no graphical userinterface, so you can
easily integrate it in your own program, e.g. as syn does.
This Program is FREEWARE. You are allowed to use and distribute asgrep for free,
but you are NOT allowed to sell asgrep for profit.
You are using asgrep at your own risk, no responsibility is taken for damages to
your computer system.
Commandline Arguments:
----------------------
Usage:
asgrep [-di <folder(s)>] [-fi <filename(s)>] [-ft <findtext>] [-rt <replacetext>] [-cf <configfile>] [switches]
-ft: use this switch for the text to find.
-rt: and -rt for text to replace it with (binary files will be skipped).
-dt: or -dt to delete found text (binary files will be skipped).
-fi: before each filename use the switch -fi.
-di: if you want to search whole directories use -di. If you have set the r+ switch
it will also search all subdirectoreis..
-ff: for the filefilter use -ff, you can only use one filefilter, you can also
combine more filetilters with wildcards, e.g. *.pas;*.dpr.
-cf: you can also use instead of this parameters a configurationfile, use
-cf configfile.txt.
-mc: report match count only.
-bk: force search/replace in and backup of .BAK files (off by default)
if option is not set, .bak files are overriden with new backups
r+ : for recursive search in directories use r+.
c+ : for casesensitive searche use c+.
ww+: searching for whole words only.
re+: use Regular Expression.
bk-: Don't backup file before replacing Text
es+: use Escape Sequences for Replace text.
b+ : for correct search in binary files.
b- : to skip binary files from search.
w+ : forces the program to build in some (50 ms) idle time (slower of course).
d+ : use d+, if you wish to display the line.
-si: silent, don't show to much infos.
-vs: very silent, implies -si.
-? : to show this help use this switch.
-version: to print out the version use this switch.
Using a configuration file:
---------------------------
This file is similar to an ini-file:
[main]
; The Text to look for
findtext=yourfindtext
; use 1 for match case, otherwise 0.
matchcase=1
; Replace the found match with this text
replacetext=yourreplacetext
; Do replace the found text with replacetext
doreplace=0
; Backup files before replacing
backup=1
; Replace Text contains Escape Sequences
escapeseq=0
; Search also binary files
checkbinary=0
; Skip binary files
skipbinary=0
; Format is either for example "*.htm;*.html" or "*.htm, *.html"
filefilter=*.*
; force the program to wait the specified amount of milliseconds before it
; searches a file
idle=50
; for recurse search from the given dirs (search all subfolders) use
recurse=1
; searching for whole words only use
wholewords=1
; use Regular Expression, can't be combined with wholewords
regexp=1
; Shows only the count of found Matches
matchcount=1
; force search/replace and backup in .BAK files (off by default)
forcebakfiles=1
[files]
; All files you want to search.
count=2
; count of the filelist
1=D:\1stFile.txt
2=D:\2ndFile.txt
; ...
[dirs]
; All directories you want to search.
count=2
1=1stDir
2=2ndDir
All commandline arguments are overwritten by the configuration file, except files
and dirs, which are added to the list. If an option is not given in the configfile,
but in the commandline, it will use the option from the commandline.
Matches are written in the consolwindow (StdOut), you can see the filename, the
line- and columnnumber and the linetext.
Credits:
--------
* The Regular Expression functions are taken from Andrey V. Sorokin's TRegExpr
Unit (http://anso.da.ru/).
________________________________________________________________________________
Best wishes Stefan
stievie@utanet.at
http://web.utanet.at/ascherst/
$Id: readme.txt,v 1.2.2.8 2004/02/29 03:23:23 neum Exp $